export const tryExecute = (func, onError, defaultReturn) => {
    try {
        func()
    } catch (error) {
        onError(error)
        return defaultReturn
    }
}